{% set clazz = "members"; %}
{% set title = "推广的用户"; %}
{% extends './modules/common/templates/main.html' %}
{% block style %}
  <link rel="stylesheet" href="{{ '/static/css/promoter.css'|version }}" />
{% endblock %}
{% block content %}
  {% if !nested %}
    <header class="bar bar-header">
      {{ macro.back() }}
      <h1>{{ title }}</h1>
    </header>
  {% endif %}
  <section class="has-header">
    {% if list.length %}
      <div id="members" class="list compact overlap">
        <div class="item">
          <div class="avatar">
            <img src="{{ holder|holder }}" class="figure noborder" />
          </div>
          <span class="text">用户名称</span>
          <span class="text">注册日期</span>
          <span class="text text-right">奖励积分</span>
          <i class="icon"></i>
        </div>
        {% for item in list %}
          <a class="item" href="/promoter/behavior/{{ item.sourceMemberId }}">
            <div class="avatar">
              <img src="{{ item.headImg|figure }}" data-social-id="{{ item.sourceAccountId }}" />
            </div>
            <span class="text">{{ item.name|default('千丁用户') }}</span>
            <span class="text">{{ item.createTime|date('Y-m-d') }}</span>
            <span class="text text-right">{{ item.integralNum|promoterIntegral }}</span>
            <i class="icon text-gray">&#xe61a;</i>
          </a>
        {% endfor %}
      </div>
    {% else %}
      <div class="plate">
        <div class="draw">
          <img src="http://7xjyap.com2.z0.glb.qiniucdn.com/image-2f0df3ff-2a9a-4367-a7df-bd53231b0a9f.png" alt="空白" />
          <h4 class="title">很遗憾，还没有您推广的用户</h4>
        </div>
      </div>
    {% endif %}
  </section>
  {% raw %}
  <script id="membersTempl" type="text/swig-template">
    {% for item in list %}
      <a class="item" href="/promoter/behavior/{{ item.sourceMemberId }}">
        <div class="avatar">
          <img src="{{ item.headImg|figure }}" data-social-id="{{ item.sourceAccountId }}" />
        </div>
        <span class="text">{{ item.name|default('千丁用户') }}</span>
        <span class="text">{{ item.createTime|date('Y-m-d') }}</span>
        <span class="text text-right">{{ item.integralNum|promoterIntegral }}</span>
        <i class="icon text-gray">&#xe61a;</i>
      </a>
    {% endfor %}
  </script>
{% endraw %}
{% endblock %}
{% block script %}
  {% parent %}
  <script src="{{ '/static/js/promoter.js'|version }}"></script>
{% endblock %}